package com.liu.common.exception;

import java.util.HashMap;
import java.util.Map;

/**
 * 后端校验，异常信息
 */
public class ValidateException extends RuntimeException{
    Map error;

    public ValidateException(Map error) {
        super();
        this.error = error;
    }

    public ValidateException(String field,String msg){
        super();
        this.error=new HashMap();
        this.error.put(field,msg);
    }

    public Map getError() {
        return error;
    }
}
